#include<stdio.h>
typedef struct student{
    char name[1024];
    int score;
}student;

void sort(student* stu, int len){
    for(int i = 0; i < len - 1; i++){
        for(int j = 0; j < len - 1 - i; j++){
            if(stu[j].score > stu[j + 1].score ){
                student temp = stu[j];
                stu[j] = stu[j + 1];
                stu[ j + 1 ] = temp;
            }
        }
    }
    for(int i = 0;i < len; i++){
        printf("%s-%d  ", stu[i].name, stu[i].score);
    }
    printf("\n");
}
int main(){
    student arr[] = {{"liuzhen", 100}, {"jiahao", 80}, {"dabi", 60}};
    sort(arr, sizeof(arr) / sizeof(arr[0]));
    return 0;
}
    
